package cn.zs.supply.service.impl;
import cn.zs.supply.common.core.domain.result.PageResult;
import cn.zs.supply.common.core.service.BaseService;
import cn.zs.supply.common.utils.OrderNoCenter;

import cn.zs.supply.domain.dto.UserDto;
import cn.zs.supply.domain.po.UserTest;
import cn.zs.supply.domain.query.UserQuery;
import cn.zs.supply.domain.vo.UserVo;
import cn.zs.supply.service.TransferTestService;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class TransferTestServiceImpl extends BaseService implements TransferTestService {

    @Autowired
    private OrderNoCenter orderNoCenter;

    public UserVo getUser(Long userId) {
        UserTest user = new UserTest();
        UserVo userVo = new UserVo();
        if (user == null) {
            return null;
        }
        BeanUtils.copyProperties(user, userVo);
        return userVo;
    }

    public PageResult<UserVo> getUserList(UserQuery query) {
        return null;
    }

    public void addUser(UserDto dto) {
        UserTest user = new UserTest();
        BeanUtils.copyProperties(dto, user);
        user.setUserId(orderNoCenter.nextNo());

    }

}
